package com.emex.app.shared.ws;

import com.emex.app.shared.data.Cashbox;
import com.emex.app.shared.data.Orders;
import com.emex.app.shared.data.OrderPayment;
import com.emex.app.shared.data.OrderPosition;
import java.util.Date;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 *
 * @author Sergey Karavaev
 */
@WebService(targetNamespace = "http://emex.com/Order")
public interface OrderWebService {

    // Order
    @WebMethod
    public int deleteOrderPrimaryKey(Integer id);

    @WebMethod
    public Orders insertOrders(Orders record);

    @WebMethod
    public Orders selectOrderByPrimaryKey(Integer id);

    @WebMethod
    public Orders updateOrdersByPrimaryKey(Orders record);

    @WebMethod
    public List<Orders> getAllClientOrders(Integer clientId);
    
    @WebMethod
    public List<Orders> getAllJuridicalClientOrders(Integer jurClientId);

    @WebMethod
    public List<Orders> getOrdersByDate(Date startDate, Date endDate);

    // OrderPosition
    @WebMethod
    public int deleteOrderPositionByPrimaryKey(Integer id);

    @WebMethod
    public OrderPosition insertOrderPosition(OrderPosition record);

    @WebMethod
    public List<OrderPosition> getOrderPositionByOrderId(Integer clientId);

    @WebMethod
    public OrderPosition selectOrderPositionByPrimaryKey(Integer id);

    @WebMethod
    public OrderPosition updateOrderPositionByPrimaryKey(OrderPosition record);

    // OrderPayment
    @WebMethod
    public int deleteOrderPaymentByPrimaryKey(Integer id);

    @WebMethod
    public OrderPayment insertOrderPayment(OrderPayment record);

    @WebMethod
    public List<OrderPayment> getOrderPaymentByOrderId(Integer orderId);

    @WebMethod
    public OrderPayment selectOrderPaymentByPrimaryKey(Integer id);

    @WebMethod
    public OrderPayment updateOrderPaymentByPrimaryKey(OrderPayment record);

    @WebMethod
    public List<OrderPayment> getOrderPaymentsByDate(Date startDate, Date endDate);

    @WebMethod
    public List<OrderPayment> getOrderPaymentByClientId(Integer clientId);

    @WebMethod
    public List<OrderPayment> getOrderPaymentsByDateEqualOrGrater(Date date);

    @WebMethod
    public Cashbox insertCashbox(Cashbox record);

    @WebMethod
    public Cashbox getCashBox();
}
